package com.codeforces;

import java.util.Scanner;

public class _1A {

	static int n, m, a, h, v;
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		n = scanner.nextInt();
		m = scanner.nextInt();
		a = scanner.nextInt();
		if (n % a == 0) {
			h = n / a;
		}
		else {
			h = n / a + 1;
		}
		if (m % a == 0) {
			v = m / a;
		}
		else {
			v = m / a + 1;	
		}
		
		System.out.println((long)h*(long)v);
	}

}
